package net.maku.express.biza.mapper.collectexpress;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.maku.express.biza.controller.collectExpress.vo.*;
import net.maku.express.biza.pojo.collectexpress.CollectExpressPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author wenyingying
* @description 针对表【collect_express】的数据库操作Mapper
* @createDate 2023-11-06 23:16:05
* @Entity net.maku.biz.pojo.collectexpress.CollectExpressPojo
*/
@Mapper
public interface CollectExpressMapper extends BaseMapper<CollectExpressPojo> {


    Page<CollectExpressVO> select(Page<CollectExpressVO> page,@Param("item")CollectExpressVO collectExpressVO);


    Page<CollectExpressVO> selectData(Page<CollectExpressVO> page,@Param("item") CollectExpressRequestVo collectExpressVO,@Param("orgId")Long orgId);


    int insertSelective(CollectExpressPojo collectExpressPojo);

    int deleteById(@Param("id") Long id);

    int updateSelective(CollectExpressUpdateRequestVO collectExpressPojo);

    int updatePackageCollectIdById(@Param("packageCollectId") Long packageCollectId, @Param("id") List<Long> id);

    int updatePackageCollectIdAndCollectStateByPackageCollectId(@Param("packageCollectId") Long packageCollectId,
            @Param("collectState") Integer collectState, @Param("oldPackageCollectId") Long oldPackageCollectId);

    CollectExpressPojo selectById(@Param("id") Long id);

    CollectExpressSelectiveVO selective(Long id);

    List<CollectExpressSelectiveVO> selective1(@Param("list") List<Long> id);

    List<CollectExpressSelectiveVO> selective2(@Param("list") List<Long> id);

   List<Map> selectPack(IPage page, CollectPackRequestVO query);

   List<CollectPackResponseVO> selectPack1(@Param("packId")Long id);

    int updateCollectStateById(@Param("collectState") Integer collectState, @Param("id") Long id);

    List<CollectExpressPojo> selectOrder(CollectExpressOrderRequestVO collectExpressOrderRequestVO);

    int updateOrderStateAndOriginIdByOriginId(@Param("orderState") Integer orderState,
            @Param("ordersNo") String ordersNo, @Param("ordersNos") String oldOrdersNo);

    int updateOrderStateAndOriginIdByCollectNo(@Param("orderState") Integer orderState,
            @Param("ordersNo") String ordersNo, @Param("collectNos") List<Long> collectNo);

    List<Long> selectCollectNoByOrdersNo(@Param("ordersNo") String ordersNo);

    List<CollectExpressOrderVO> selectOrderInfo(@Param("orderNo")String orderNo);


}




